package com.ssm.util.test;

import java.io.File;

public class bbbb {
	
	
	static int totalCount=0;
	static boolean kai=true;
	public bbbb(){
		if (kai==false) {
			totalCount=0;
		}
	}
	public static int name(String path) {

		File rootFile = new File(path);
		if (rootFile.exists()) {
			File[] listFiles = rootFile.listFiles();
			for (File file : listFiles) {
				if (!file.isDirectory()) {
					totalCount++;
				}else {
					System.out.println("是目录");
					name(file.getAbsolutePath());
				}
			}
		}
		kai=false;
		return totalCount;
	}
	public static void main(String[] args) {
		int name = name("D://main");
		System.out.println(name);
	}
}
